home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 2002 November / SGI Freeware 2002 November - Disc 2.iso / dist / fw_ispell.idb / usr / freeware / src / ispell / patches.z / patches
Text File  |  2000-01-25  |  22KB  |  740 lines

  1. --- ./languages/english/Makefile    Thu Oct 12 12:04:08 1995
  2. +++ ../ispell-3.1/./languages/english/Makefile    Tue Jan  4 08:21:33 2000
  3. @@ -436,8 +436,8 @@
  4.      set -x; \
  5.      PATH=$(PATHADDER):$$PATH; \
  6.      export PATH; \
  7. -    munchlist -v -l $(AFFIXES) $$dicts \
  8. -      > english.med+ \
  9. +    munchlist -l $(AFFIXES) $$dicts \
  10. +      1> english.med+ 2> /dev/null \
  11.          ||  rm -f english.med+
  12.      test -s english.med+ \
  13.        ||  (echo 'error: zero-length dictionary generated'; \
  14. --- ./correct.c    Thu Oct 12 12:04:06 1995
  15. +++ ../ispell-3.1/./correct.c    Tue Jan  4 08:16:24 2000
  16. @@ -50,6 +50,13 @@
  17.  
  18.  /*
  19.   * $Log: correct.c,v $
  20. + *
  21. + * HTML-entities added by Casper Maarbjerg, 1997/05/16 as listed in
  22. + * http://uts.cc.utexas.edu/~churchh/latin1.html
  23. + *
  24. + * Line added by Gerry Tierney to reset insidehtml flag for each new
  25. + * file in case a tag was left open by a previous file.  10/14/95
  26. + *
  27.   * Revision 1.59  1995/08/05  23:19:43  geoff
  28.   * Fix a bug that caused offsets for long lines to be confused if the
  29.   * line started with a quoting uparrow.
  30. @@ -233,6 +240,9 @@
  31.      int        bufsize;
  32.      int        ch;
  33.  
  34. +    /* line added by Gerry Tierney */
  35. +    insidehtml = 0;
  36. +
  37.      for (bufno = 0;  bufno < contextsize;  bufno++)
  38.      contextbufs[bufno][0] = '\0';
  39.  
  40. @@ -295,7 +305,11 @@
  41.      char *        start_l2;
  42.      char *        begintoken;
  43.  
  44. +#ifdef HTSPECIAL
  45. +    begintoken = ctok_start == NULL ? contextbufs[0] : ctok_start;
  46. +#else
  47.      begintoken = *curchar - strlen (ctok);
  48. +#endif
  49.  
  50.      if (icharlen (itok) <= minword)
  51.      return;            /* Accept very short words */
  52. @@ -374,7 +388,11 @@
  53.      if (start_l2 < contextbufs[0])
  54.          start_l2 = contextbufs[0];
  55.      }
  56. +#ifdef HTSPECIAL
  57. +    show_line (start_l2, begintoken, *curchar - begintoken );
  58. +#else
  59.      show_line (start_l2, begintoken, (int) strlen (ctok));
  60. +#endif
  61.  
  62.      if (minimenusize != 0)
  63.      {
  64. @@ -594,6 +612,16 @@
  65.      ichar = SET_SIZE + laststringch;
  66.      else
  67.      ichar = chartoichar (ch);
  68. +#ifdef HTSPECIAL
  69. +    if (htmlflag == 1 && ch == '&' && !vflag && len == 1)
  70. +    {
  71. +    ch = html_ent(cp);
  72. +    if (output)
  73. +        (void) putchar (ch);
  74. +    return 1;
  75. +    }
  76. +    else
  77. +#endif
  78.      if (!vflag  &&  iswordch (ichar)  &&  len == 1)
  79.      {
  80.      if (output)
  81. @@ -1604,6 +1632,11 @@
  82.      if (**cc == '\0')
  83.          break;
  84.      if (!aflag && !lflag)
  85. +#ifdef HTSPECIAL
  86. +        if (htmlflag == 1 && (unsigned char)**cc >= FIRST_ISO)
  87. +        fprintf(outfile, iso_ent[(unsigned char) **cc - FIRST_ISO]);
  88. +        else
  89. +#endif
  90.          (void) putc (**cc, outfile);
  91.      (*cc)++;
  92.      }
  93. --- ./ispell.c    Thu Oct 12 12:04:07 1995
  94. +++ ../ispell-3.1/./ispell.c    Tue Jan  4 08:16:24 2000
  95. @@ -49,6 +49,12 @@
  96.  
  97.  /*
  98.   * $Log: ispell.c,v $
  99. + *
  100. + * Modifications made by Gerry Tierney <gtierney@nova.ucd.ie> to
  101. + * allow checking of html code.  Adds -h switch and checking for
  102. + * html files by .html or .htm extension. 
  103. + * 14th of October 1995
  104. + *
  105.   * Revision 1.133  1995/10/11  04:30:29  geoff
  106.   * Get rid of an unused variable.
  107.   *
  108. @@ -298,7 +304,9 @@
  109.       *    ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789
  110.       *    ^^^^       ^^^ ^  ^^ ^^
  111.       *    abcdefghijklmnopqrstuvwxyz
  112. -     *    ^^^^^^     ^^^ ^  ^^ ^^^
  113. +     *    ^^^^^^ ^   ^^^ ^  ^^ ^^^
  114. +     *
  115. +     * -h flag used by Gerry Tierney for html-mode
  116.       */
  117.      arglen = strlen (*argv);
  118.      switch ((*argv)[1])
  119. @@ -438,6 +446,9 @@
  120.              (void) printf ("\tNO8BIT\n");
  121.  #else /* NO8BIT */
  122.              (void) printf ("\t!NO8BIT (8BIT)\n");
  123. +#ifdef HTSPECIAL
  124. +            (void) printf ("\tHTSPECIAL \"(ISO-HTML mode)\"\n");
  125. +#endif
  126.  #endif /* NO8BIT */
  127.              (void) printf ("\tNRSPECIAL = \"%s\"\n", NRSPECIAL);
  128.              (void) printf ("\tOLDPAFF = \"%s\"\n", OLDPAFF);
  129. @@ -488,6 +499,7 @@
  130.          if (arglen > 2)
  131.              usage ();
  132.          tflag = 0;        /* nroff/troff mode */
  133. +        htmlflag = -1;        /* non-html mode */
  134.          deftflag = 0;
  135.          if (preftype == NULL)
  136.              preftype = "nroff";
  137. @@ -496,10 +508,19 @@
  138.          if (arglen > 2)
  139.              usage ();
  140.          tflag = 1;
  141. +        htmlflag = -1;        /* non-html mode */
  142.          deftflag = 1;
  143.          if (preftype == NULL)
  144.              preftype = "tex";
  145.          break;
  146. +        /* -h option to enable HTML-mode added by Gerry Tierney */
  147. +        case 'h':
  148. +        if (arglen > 2)
  149. +            usage ();
  150. +        tflag = 0;        /* non-TeX mode */
  151. +        deftflag = 0;
  152. +        htmlflag = 1;        /* Html-Mode */
  153. +        break;
  154.          case 'T':            /* Set preferred file type */
  155.          p = (*argv)+2;
  156.          if (*p == '\0')
  157. @@ -810,7 +831,7 @@
  158.      if (tflag < 0)
  159.      tflag =
  160.        (cp = rindex (filename, '.')) != NULL  &&  strcmp (cp, ".tex") == 0;
  161. -
  162. +    
  163.      if (prefstringchar < 0)
  164.      {
  165.      defdupchar =
  166. @@ -818,6 +839,13 @@
  167.      if (defdupchar < 0)
  168.          defdupchar = 0;
  169.      }
  170. +    /* Modification by Gerry Tierney to set hmtl-mode 
  171. +     * based on file extension */
  172. +    if (htmlflag == 0)
  173. +    htmlflag =
  174. +      (cp = rindex (filename, '.')) != NULL  &&  
  175. +      ( strcmp (cp, ".html") == 0 ||
  176. +             strcmp (cp, ".htm") == 0);
  177.  
  178.      if ((infile = fopen (filename, "r")) == NULL)
  179.      {
  180. --- ./ispell.h    Thu Oct 12 12:04:08 1995
  181. +++ ../ispell-3.1/./ispell.h    Tue Jan  4 08:16:24 2000
  182. @@ -42,6 +42,16 @@
  183.  
  184.  /*
  185.   * $Log: ispell.h,v $
  186. + *
  187. + * Patch by Casper Maarbjerg, http://www.nyx.net/~cmaarbj/
  188. + * 1997/05/19, for ISO HTML-entity conversion in html mode.
  189. + * Added variable ctok_start to hold the start of raw html word.
  190. + * changes wrapped in "#ifdef HTSPECIAL".
  191. + *
  192. + * Patch by Gerry Tierney <gtierney@nova.ucd.ie>
  193. + * 1995/10/14
  194. + * Added variables htmlflag and insidehtml for use in html-mode
  195. + *
  196.   * Revision 1.68  1995/03/06  02:42:41  geoff
  197.   * Be vastly more paranoid about parenthesizing macro arguments.  This
  198.   * fixes a bug in defmt.c where a complex argument was passed to
  199. @@ -623,6 +633,26 @@
  200.  INIT (int deftflag, -1);        /* NZ for TeX mode by default */
  201.  INIT (int tflag, DEFTEXFLAG);        /* NZ for TeX mode in current file */
  202.  INIT (int prefstringchar, -1);        /* Preferred string character type */
  203. +/* The following two definitions added by 
  204. + * Gerry Tierney <gtierney@nova.ucd.ie>
  205. + * 14th Oct 95
  206. + */
  207. +INIT (int htmlflag, 0);            /* HTML-checking state. 
  208. +                                 *    1=enable html-mode,
  209. +                                 *    0=enable html-mode based on filename,
  210. +                                 *  -1=disable html-mode */
  211. +INIT (int insidehtml, 0);        /* Flag to indicate that the current html 
  212. +                                 *    tag has spanned more than one line */    
  213. +/* End of Gerry's Interference */
  214. +#ifdef HTSPECIAL        /* decode "&#;" for HTML-ISO characters */
  215. +#ifdef NO8BIT
  216. +#error HTSPECIAL requires NO8BIT to be undefined !
  217. +#endif
  218. +#define FIRST_ISO 160        /* First 8-bit code of valid HTML entities */
  219. +extern char *iso_ent[];        /* HTML entities defined in defmt.c */
  220. +extern int html_ent P ((char **in));
  221. +INIT (char *ctok_start, NULL);    /* Remember start of raw HTML word */
  222. +#endif
  223.  
  224.  INIT (int terse, 0);            /* NZ for "terse" mode */
  225.  
  226. --- ./defmt.c    Thu Oct 12 12:04:06 1995
  227. +++ ../ispell-3.1/./defmt.c    Tue Jan  4 08:16:24 2000
  228. @@ -54,6 +54,12 @@
  229.  
  230.  /*
  231.   * $Log: defmt.c,v $
  232. + * ISO-character de-/en- coding in html mode added 1997/05/16
  233. + * by Casper Maarbjerg,  http://www.nyx.net/~cmaarbj/
  234. + *
  235. + * html-mode code added by Gerry Tierney <gtierney@nova.ucd.ie>
  236. + * 14th of Oct '95
  237. + *
  238.   * Revision 1.41  1995/08/05  23:19:47  geoff
  239.   * Get rid of an obsolete comment.  Add recognition of documentclass and
  240.   * usepackage for Latex2e support.
  241. @@ -140,6 +146,7 @@
  242.  static void    TeX_open_paren P ((char ** bufp));
  243.  static void    TeX_skip_check P ((char ** bufp));
  244.  static int    TeX_strncmp P ((char * a, char * b, int n));
  245. +char *        htmlword P ((unsigned char *source));
  246.  
  247.  #define ISTEXTERM(c)   (((c) == TEXLEFTCURLY) || \
  248.              ((c) == TEXRIGHTCURLY) || \
  249. @@ -160,6 +167,25 @@
  250.  static int save_math_mode;
  251.  static char save_LaTeX_Mode;
  252.  
  253. +static char *skiptag(buf, tagend, taglen)    /* Skip past specific tag */
  254. +    char *    buf;
  255. +    char *    tagend;
  256. +    int        taglen;
  257. +    {
  258. +    while(*buf)
  259. +    {
  260. +    if (*buf != *tagend && ++buf)
  261. +        continue;
  262. +    if (strncasecmp(buf, tagend, taglen) && ++buf)
  263. +        continue;
  264. +    buf += taglen;
  265. +    insidehtml = 0;
  266. +    break;
  267. +    }
  268. +    return(buf);
  269. +    }
  270. +
  271. +/* parameters changed by Gerry Tierney to include the output file */
  272.  static char * skiptoword (bufp)        /* Skip to beginning of a word */
  273.      char *    bufp;
  274.      {
  275. @@ -170,6 +196,82 @@
  276.      ||  (tflag  &&  (math_mode & 1)))
  277.        )
  278.      {
  279. +    /* Start of modifications by Gerry Tierney */
  280. +        /* We first check for an end-quote character if we are checking
  281. +           inside of an alt attribute.  If we find one we ignore the 
  282. +           rest of the tag */
  283. +        if (insidehtml == -1 && *bufp == '\"')
  284. +        {
  285. +            insidehtml = 0;
  286. +            while (*bufp != '>' && *bufp != '\0')
  287. +                bufp++;
  288. +            if (*bufp == '\0')
  289. +                    insidehtml = 1;
  290. +        }
  291. +        /* If we are checking a html file we want to ignore any
  292. +           HTML tags.  These should start with a '<' 
  293. +           and end with a '>' so we simply skip over anything
  294. +           between these two symbols.  If we reach the end of the line
  295. +           before finding a matching '>' we set a flag 'insidehtml' */
  296. +        if (htmlflag == 1 && *bufp == '<')
  297. +        {
  298. +            /* Found start of html tag, if it is a script tag, 
  299. +             * skip until end of script */
  300. +            if (insidehtml == 2 || (strncasecmp(bufp,"<script", 7) == 0))
  301. +             {
  302. +                 insidehtml = 2;
  303. +                 bufp = skiptag(bufp, "</script>", 9);
  304. +             }
  305. +             /* It could also be a comment, containing a '>', so it
  306. +              * seems safer to skip until the first end-of-comment.. */
  307. +            else if (insidehtml == 3 || (strncmp(bufp,"<!--", 4) == 0))
  308. +             {
  309. +                insidehtml = 3;
  310. +                 bufp = skiptag(bufp, "-->", 3);
  311. +             }
  312. +             else   {
  313. +            /* Found start of html tag - Skip to end of tag or EOL */
  314. +            while (*bufp != '>' && *bufp != '\0' &&
  315. +                   strncasecmp(bufp,"alt=\"",5) != 0)
  316. +                bufp++;
  317. +            /* If we find an alt tag, we want to check its text */
  318. +            if (strncasecmp(bufp,"alt=\"",5) == 0)
  319. +            { 
  320. +                insidehtml=-1; 
  321. +                bufp = bufp + 4; 
  322. +            }
  323. +            else if (*bufp == '\0')
  324. +                /* we've reached EOL without closing the tag */
  325. +                insidehtml = 1;
  326. +            }
  327. +        }
  328. +#ifndef HTSPECIAL
  329. +        /* HTSPECIAL characters _NOT_ defined, so...
  330. +        */
  331. +        /* Skip over quoted entities such as "
  332. +           These all start with an ampersand and
  333. +           end with a semi-colon.  We do not need
  334. +           to worry about them extending over more than one line */
  335. +        if (htmlflag == 1 && *bufp == '&')
  336. +        {
  337. +            while (*bufp && *bufp != ';' && *bufp != ' ')
  338. +                bufp++;
  339. +        }
  340. +#else
  341. +        if (htmlflag == 1 && *bufp == '&')
  342. +            {
  343. +            char *cp2 = bufp;
  344. +
  345. +            if (html_ent(&cp2) >= FIRST_ISO)
  346. +            break;
  347. +            if (!skip_ent(&bufp))
  348. +                bufp++;
  349. +            continue;
  350. +            }
  351. +#endif
  352. +    /* End of modifications by Gerry Tierney */
  353. +
  354. +            
  355.      /* check paren necessity... */
  356.      if (tflag) /* TeX or LaTeX stuff */
  357.          {
  358. @@ -329,6 +431,24 @@
  359.      lastboundary = NULL;
  360.      for (  ;  ;  )
  361.      {
  362. +#ifdef HTSPECIAL
  363. +    if (htmlflag == 1 && *bufp == '&')
  364. +        {
  365. +        char *cp2 = bufp;    /* Avoid compiler complaints ... */
  366. +                /* .. about taking address of register bufp */
  367. +        if (html_ent(&cp2) < FIRST_ISO)
  368. +        {
  369. +        lastboundary = bufp;
  370. +        bufp = cp2;
  371. +        break;
  372. +        }
  373. +        else
  374. +            {
  375. +        lastboundary = NULL;
  376. +        bufp = cp2;
  377. +            }
  378. +        }
  379. +#endif
  380.      if (*bufp == '\0')
  381.          {
  382.          if (TeX_comment)
  383. @@ -389,7 +509,8 @@
  384.      if (hadlf)
  385.      contextbufs[0][len] = 0;
  386.  
  387. -    if (!tflag)
  388. +    /* Conditions modified by Gerry Tierney to handle html-mode */
  389. +    if (!tflag && htmlflag != 1)
  390.      {
  391.      /* skip over .if */
  392.      if (*currentchar == NRDOT
  393. @@ -426,7 +547,8 @@
  394.  
  395.  
  396.      /* if this is a formatter command, skip over it */
  397. -    if (!tflag && *currentchar == NRDOT)
  398. +    /* Conditions modified by Gerry Tierney to handle html-mode */
  399. +    if (!tflag && htmlflag != 1 && *currentchar == NRDOT)
  400.      {
  401.      while (*currentchar  &&  !myspace (chartoichar (*currentchar)))
  402.          {
  403. @@ -441,10 +563,47 @@
  404.          return;
  405.          }
  406.      }
  407. +    /* Start of modifications by Gerry Tierney */
  408.  
  409. +    /* If we are checking a htmlfile and we have being left with
  410. +       an open tag from a previous line, then we ignore everything
  411. +       from the start of the line until we either reach the end of
  412. +       the line or we close the tag */
  413. +    if (htmlflag == 1)
  414. +    {
  415. +        if (insidehtml == 1) 
  416. +            while (*currentchar != '>' && *currentchar != '\0')
  417. +            {
  418. +                /* We check for an alt attribute (found inside img 
  419. +                   tags).  We want to spell check it's text so if
  420. +                   we find one, we switch out html-mode until we
  421. +                   find the next quote character.  We signal this
  422. +                   state by setting the insidehtml flag to -1 */
  423. +                if (strncasecmp(currentchar,"alt=\"",5) == 0)
  424. +                {
  425. +                    copyout(¤tchar,5);
  426. +                    insidehtml = -1;
  427. +                    break;
  428. +                }
  429. +                (void) putc (*currentchar, ofile);
  430. +                currentchar++;
  431. +            }
  432. +        else if (insidehtml == 2)        /* filtering javascript */
  433. +            currentchar = skiptag(currentchar, "</script>", 9);
  434. +        else if (insidehtml == 3)        /* filtering comments */
  435. +            currentchar = skiptag(currentchar, "-->", 3);
  436. +        else if (*currentchar == '>')
  437. +        /* We've closed the tag so we reset the flag */
  438. +            insidehtml = 0;
  439. +    }
  440. +    /* End of modifications by Gerry Tierney */
  441. +    
  442.      for (  ;  ;  )
  443.      {
  444.      p = skiptoword (currentchar);
  445. +#ifdef HTSPECIAL
  446. +    ctok_start = p;
  447. +#endif
  448.      if (p != currentchar)
  449.          copyout (¤tchar, p - currentchar);
  450.  
  451. @@ -453,6 +612,23 @@
  452.  
  453.      p = ctoken;
  454.      endp = skipoverword (currentchar);
  455. +#ifdef HTSPECIAL
  456. +        if (htmlflag == 1)  /* We are honoring the ISO-HTML entities, */
  457. +            {               /* and have to convert to ISO before lookup */
  458. +        while (currentchar < endp  &&  p < ctoken + sizeof ctoken - 1)
  459. +            {
  460. +                if (*currentchar == '&')
  461. +            {
  462. +            *p++ = html_ent(¤tchar);
  463. +            if (currentchar > endp)
  464. +            currentchar = endp;
  465. +            }
  466. +        else   
  467. +            *p++ = *currentchar++;
  468. +        }
  469. +        }
  470. +    else
  471. +#endif
  472.      while (currentchar < endp  &&  p < ctoken + sizeof ctoken - 1)
  473.          *p++ = *currentchar++;
  474.      *p = 0;
  475. @@ -545,6 +721,11 @@
  476.          }
  477.          }
  478.      if (!aflag  &&  !lflag)
  479. +#ifdef HTSPECIAL
  480. +        if (htmlflag == 1)   /* Translate into output file */
  481. +        (void) fprintf (ofile, "%s", htmlword(ctoken));
  482. +        else
  483. +#endif
  484.         (void) fprintf (ofile, "%s", ctoken);
  485.      }
  486.  
  487. @@ -899,3 +1080,178 @@
  488.      }
  489.      return cmpresult;
  490.      }
  491. +
  492. +
  493. +#ifdef HTSPECIAL
  494. +
  495. +/*
  496. + * Code to convert from / to ISO HTML-entities.
  497. + *
  498. + * Decoding of alphabetic entities is performed by two table lookups,
  499. + * one for each of the first two characters after the `&'.
  500. + *
  501. + * The first lookup decides which string to use for the second lookup,
  502. + * and if both match, the corresponding position in the isochar array
  503. + * holds the character value.
  504. + *
  505. + * After the 8-bit value is determined, the input is verified against
  506. + * the iso_ent array, using strncmp(), and in case of mismatch the
  507. + * function returns the input character unconverted.
  508. + *
  509. + * The alternate numeric form of &#nnn; is also decoded by atoi, and
  510. + * checked for sanity, but will be converted to the name-form on output.
  511. + *
  512. + * Encoding is performed by htmlword on characters between FIRST_ISO and 255,
  513. + * and the iso_ent table must hold an entry for each.
  514. + */
  515. +static char *Y_key     = "ACEINOTUYsaceinotuy";   /* Primary key */
  516. +
  517. +static char *X_key[]   = {     /* Secondary key: */
  518. +   "gacturE",
  519. +   "c",
  520. +   "gacuT",
  521. +   "gacu",
  522. +   "t",
  523. +   "gactus",
  524. +   "h",
  525. +   "gacu",
  526. +   "a",
  527. +   "z",
  528. +   "gacture",
  529. +   "c",
  530. +   "gacut",
  531. +   "gacu",
  532. +   "t",
  533. +   "gactus",
  534. +   "h",
  535. +   "gacu",
  536. +   "au"
  537. +};
  538. +
  539. +static unsigned char *isochar[] = {   /* 8-bit values of above table */
  540. +   "\300\301\302\303\304\305\306",
  541. +   "\307",
  542. +   "\310\311\312\313\320",
  543. +   "\314\315\316\317",
  544. +   "\321",
  545. +   "\322\323\324\325\326\330",
  546. +   "\336",
  547. +   "\331\332\333\334",
  548. +   "\335",
  549. +   "\337",
  550. +   "\340\341\342\343\344\345\346",
  551. +   "\347",
  552. +   "\350\351\352\353\360",
  553. +   "\354\355\356\357",
  554. +   "\361",
  555. +   "\362\363\364\365\366\370",
  556. +   "\376",
  557. +   "\371\372\373\374",
  558. +   "\375\377",
  559. +};
  560. +
  561. +/*
  562. + * Reference: http://uts.cc.utexas.edu/~churchh/latin1.html
  563. + */
  564. +char *iso_ent[] = {   /* Valid HTML characters above 160 in numerical order */
  565. +   " ", "¡", "¢", "£", "¤", "¥",
  566. +   "¦", "§", "¨", "©", "ª", "«",
  567. +   "¬", "­", "®", "¯", "°", "±",
  568. +   "²", "³", "´", "µ", "¶", "·",
  569. +   "¸", "¹", "º", "»", "¼", "½",
  570. +   "¾", "¿",
  571. +   "À", "Á", "Â", "Ã", "Ä", "Å", "Æ",
  572. +   "Ç",
  573. +   "È", "É", "Ê", "Ë",
  574. +   "Ì", "Í", "Î", "Ï",
  575. +   "Ð",    "Ñ",
  576. +   "Ò", "Ó", "Ô", "Õ", "Ö", "×", "Ø",
  577. +   "Ù", "Ú", "Û", "Ü",
  578. +   "Ý", "Þ",  "ß",
  579. +   "à", "á", "â", "ã", "ä", "å", "æ",
  580. +   "ç",
  581. +   "è", "é", "ê", "ë",
  582. +   "ì", "í", "î", "ï",
  583. +   "ð",    "ñ",
  584. +   "ò", "ó", "ô", "õ", "ö", "÷", "ø",
  585. +   "ù", "ú", "û", "ü",
  586. +   "ý", "þ",  "Ÿ"
  587. +};
  588. +
  589. +/* Increment pointer past ignored entity, returning nonzero on success
  590. + */
  591. +int skip_ent(char **entity)
  592. +{
  593. +   char **cpp;
  594. +   int j, match = 0;
  595. +
  596. +    if (strncmp(*entity, "<" , 4) == 0 || strncmp(*entity, ">" , 4) == 0)
  597. +    match = 3;
  598. +    else if (strncmp(*entity, "&" , 5) == 0)
  599. +    match = 4;
  600. +    else if (strncmp(*entity, """ , 6) == 0)
  601. +    match = 5;
  602. +    else if (strncmp(*entity, " " , 6) == 0)
  603. +    match = 5;
  604. +    if (match)
  605. +    *entity += match;
  606. +    return(match);
  607. +}
  608. +
  609. +/* Return 8-bit value of valid html-entity pointed to by *in, incrementing
  610. + * the pointer by the length of the tag.
  611. + * Only the first two alpha characters after '&' is tested, then the
  612. + * decoded char is verified against the iso_ent array.
  613. + */
  614. +int html_ent(char **in)
  615. +    {
  616. +    char *cp, *cp2, ch;
  617. +    char *decoded;
  618. +    int row, val, taglen = 1;
  619. +
  620. +    cp = cp2 = *in;
  621. +    val = ch = **in;
  622. +
  623. +    if (*++cp && *cp == '#' && (*++cp == '1' || *cp == '2') && (val = atoi(cp)))
  624. +    {
  625. +    if (val > 255 || *++cp < '0' || *cp > '5' || *++cp < '0' || *cp > '9' || *++cp!=';')
  626. +        val = 0;
  627. +    else
  628. +        taglen = 6;  /* Validate numeric tag */
  629. +    }
  630. +    else
  631. +    {
  632. +    if ((cp = index(Y_key, *++cp2)) &&
  633. +        (decoded = index(*(X_key+(row = cp-Y_key)), *++cp2)) &&
  634. +           (val = isochar[row] [ decoded - X_key[row]]) >= FIRST_ISO)
  635. +        taglen = strlen(iso_ent[val - FIRST_ISO]);
  636. +    if (val<FIRST_ISO || strncmp(iso_ent[val-FIRST_ISO], *in, taglen) != 0)
  637. +        {
  638. +        taglen = 1;
  639. +        val = 0;    /* Disqualify alphabetic tag */
  640. +        }
  641. +    }
  642. +    *in += taglen;
  643. +    return(val ? val : ch);
  644. +    }
  645. +
  646. +/* convert word with 8-bit chars in a locally stored, static string,
  647. + * to properly escaped html, returning a pointer to it.
  648. + */
  649. +char *htmlword(unsigned char *source)
  650. +    {
  651. +    static char word[256];
  652. +    register char *cp, *ent;
  653. +
  654. +    for (cp = word; *source && (cp - word < 255); ++source)
  655. +    if (*source < FIRST_ISO)
  656. +        *cp++ = *source;
  657. +    else
  658. +        for (ent = iso_ent[*source-FIRST_ISO]; *ent && (cp-word < 255); ++ent)
  659. +        *cp++ = *ent;
  660. +    *cp = '\0';
  661. +    return(word);
  662. +    }
  663. +
  664. +#endif
  665. +
  666. --- ./ispell.1X    Mon Jan 23 10:28:25 1995
  667. +++ ../ispell-3.1/./ispell.1X    Tue Jan  4 08:16:24 2000
  668. @@ -38,6 +38,9 @@
  669.  .\" SUCH DAMAGE.
  670.  .\"
  671.  .\" $Log: ispell.1X,v $
  672. +.\"
  673. +.\" Documentation for html-mode added by Gerry Tierney 10/14/1995
  674. +.\"
  675.  .\" Revision 1.80  1995/01/08  23:23:31  geoff
  676.  .\" Document the new personal-dictionary behavior (dictionary named after
  677.  .\" the hash file is preferred).
  678. @@ -110,6 +113,7 @@
  679.  .IP \fIcommon-flags\fP:
  680.  .RB [ \-t ]
  681.  .RB [ \-n ]
  682. +.RB [ \-h ]
  683.  .RB [ \-b ]
  684.  .RB [ \-x ]
  685.  .RB [ \-B ]
  686. @@ -296,6 +300,8 @@
  687.  The input file is in TeX or LaTeX format.
  688.  .IP \fB\-n\fR
  689.  The input file is in nroff/troff format.
  690. +.IP \fB\-h\fR
  691. +The input file is in html format.
  692.  .IP \fB\-b\fR
  693.  Create a backup file by appending ".bak"
  694.  to the name of the input file.
  695. @@ -337,8 +343,12 @@
  696.  .RB ( \-n )
  697.  or TeX/LaTeX
  698.  .RB ( \-t )
  699. -input mode.
  700. -(The default is controlled by the DEFTEXFLAG installation option.)
  701. +input mode (This does not work for html
  702. +.RB ( \-h )
  703. +mode.  However html-mode is assumed for any files with a ".html"
  704. +or ".htm" extension unless nroff/troff or TeX/LaTeX modes have
  705. +been explicitly defined).
  706. +(The default mode is controlled by the DEFTEXFLAG installation option.)
  707.  TeX/LaTeX mode is also automatically selected if an input file has
  708.  the extension ".tex", unless overridden by the
  709.  .B \-n
  710. --- ./fields.c    Tue Jan 25 10:31:54 1994
  711. +++ ../ispell-3.1/./fields.c    Tue Jan  4 08:23:15 2000
  712. @@ -61,8 +61,10 @@
  713.  extern void    free ();
  714.  extern char *    malloc ();
  715.  extern char *    realloc ();
  716. +#ifndef __STRING_H__
  717.  extern char *    strchr ();
  718.  extern int    strlen ();
  719. +#endif /* __STRING_H__ */
  720.  
  721.  /*
  722.   * Read one line of the given file into a buffer, break it up into
  723. --- ./version.h    Thu Oct 12 12:04:46 1995
  724. +++ ../ispell-3.1/./version.h    Tue Jan  4 08:27:26 2000
  725. @@ -8,10 +8,13 @@
  726.   */
  727.  
  728.  static char * Version_ID[] = {
  729. -    "@(#) International Ispell Version 3.1.20 10/10/95",
  730. +    "@(#) International Ispell Version 3.1.20 1995/10/10, sgipl1",
  731.      "@(#) Copyright (c), 1983, by Pace Willisson",
  732.      "@(#) International version Copyright (c) 1987, 1988, 1990-1995,",
  733.      "@(#) by Geoff Kuenning, Granada Hills, CA.  All rights reserved.",
  734. +    "@(#)",
  735. +    "@(#) Configured and built for SGI Freeware by Vince Levey",
  736. +    "@(#) (http://reality.sgi.com/vincel/).",
  737.      "@(#)",
  738.      "@(#) Redistribution and use in source and binary forms, with or without",
  739.      "@(#) modification, are permitted provided that the following conditions",
  740.